#{extends '/template/main.html' /}
<script>
    var id='${id}';
    var pageNumber = '${pageNumber}';

    function saveDetail() {
        $('#idForm').submit();
    }

</script>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title" onclick="save()">
        *{<button id="idBtnSave" class="btn btn-info" onclick="saveDetail();">保存</button>}*
        </h3>
        *{<div class="panel-options">}*
            *{<a href="#" data-toggle="panel" >}*
                *{<span class="collapse-icon">&ndash;</span>}*
                *{<span class="expand-icon">+</span>}*
            *{</a>}*
        *{</div>}*
    </div>
    <div class="panel-body">

        <form id="idForm" method="POST" role="form" action="/warehouse/AdminSupplierCtrl/saveDetail" enctype="multipart/form-data" class="form-horizontal validate">
            <input id="" name="adminSupplier.id" value="${adminSupplier?.id}" type="hidden">
            <input id="idPageNumber" name="pageNumber" value="${pageNumber}" type="hidden">

            <div class="form-group">
                <label for="idCode" class="col-sm-2 control-label" >编&nbsp;&nbsp;&nbsp;&nbsp;号</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control " name="adminSupplier.code" id="idCode" readonly value="${adminSupplier?.code}"  placeholder="编号自动生成">
                </div>
            </div>
            <div class="form-group">
                <label for="idName" class="col-sm-2 control-label" >名&nbsp;&nbsp;&nbsp;&nbsp;称</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="adminSupplier.name" id="idName" value="${adminSupplier?.name}"  placeholder="">
                </div>
            </div>
            <div class="form-group">
                <label for="idPhone" class="col-sm-2 control-label" >手机号码</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="adminSupplier.phone" id="idPhone" value="${adminSupplier?.phone}"  placeholder="">
                </div>
            </div>

            <div class="form-group">
                <label for="idAvailableStatus" class="col-sm-2 control-label" >启用状态</label>
                <div class="col-sm-10">
                    <select class="form-control" name="adminSupplier.availableStatus" id="idAvailableStatus" data-validate="required">
                    *{<option value="" #{if rechargeCombo?.availableStatus == null } selected="true"#{/if}>请选择启用状态</option>}*
                        <option value="AVAILABLE" #{if adminSupplier?.availableStatus == models.constants.AvailableStatus.AVAILABLE || adminSupplier?.availableStatus == null} selected="true"#{/if}>启用</option>
                        <option value="FREEZE" #{if adminSupplier?.availableStatus == models.constants.AvailableStatus.FREEZE } selected="true"#{/if}>禁用</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="idAddress" class="col-sm-2 control-label" >地址</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" name="adminSupplier.address" id="idAddress" value="${adminSupplier?.address}"  placeholder="">
                </div>
            </div>
            <div class="form-group">
                <label for="idRemark" class="col-sm-2 control-label" >备注</label>
                <div class="col-sm-10">
                    *{<input type="" class="form-control" name="adminSupplier.remark" id="idRemark" value="${adminSupplier?.remark}"  placeholder="">}*
                    <textarea class="form-control" name="adminSupplier.remark" id="idRemark" style="height:80px;">${adminSupplier?.remark}</textarea>
                </div>
            </div>

            <div class="form-group">
                <label for="bespeak_btn" class="col-sm-2 control-label" ></label>
                <div class="col-sm-10">
                    <button class="btn btn-info btn-lg" type="submit" id="bespeak_btn">确认保存</button>
                </div>
            </div>
        </form>

    </div>
</div>

<!-- Imported styles on this page -->
<link rel="stylesheet" href="/public/js/wysihtml5/src/bootstrap-wysihtml5.css">
<link rel="stylesheet" href="/public/js/uikit/vendor/codemirror/codemirror.css">
<link rel="stylesheet" href="/public/js/uikit/uikit.css">
<link rel="stylesheet" href="/public/js/uikit/css/addons/uikit.almost-flat.addons.min.css">
<script src="/public/js/wysihtml5/lib/js/wysihtml5-0.3.0.js"></script>
<!-- Imported scripts on this page -->
<script src="/public/js/wysihtml5/src/bootstrap-wysihtml5.js"></script>
<script src="/public/js/uikit/vendor/codemirror/codemirror.js"></script>
<script src="/public/js/uikit/vendor/marked.js"></script>
<script src="/public/js/uikit/js/uikit.min.js"></script>
<script src="/public/js/uikit/js/addons/htmleditor.min.js"></script>
<script src="/public/js/ckeditor/ckeditor.js"></script>
<script src="/public/js/ckeditor/adapters/jquery.js"></script>

<!-- Imported scripts on this page -->
<script src="/public/js/jquery-validate/jquery.validate.min.js"></script>